﻿using Dapper;
using System;
using BCEntity.Common.Cooperation.WebsiteCooperation;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Common.Cooperation.WebsiteCooperation
{
    /// <summary>
    /// 官网合作留言
    /// </summary>
    public interface IWebsiteCooperationData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="websiteCooperationId">官网合作留言</param>
        Task<bool> Exists(int websiteCooperationId);
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="companyName">公司名称</param>
        Task<bool> Exists(string companyName);
        /// <summary>
        /// 增加官网合作留言
        /// </summary>
        /// <param name="entity">官网合作留言信息</param>
        Task<WebsiteCooperationEntity> Add(WebsiteCooperationEntity entity);
        /// <summary>
        /// 更新官网合作留言
        /// </summary>
        /// <param name="entity">官网合作留言信息</param>
        Task<WebsiteCooperationEntity> Update(WebsiteCooperationEntity entity);
        /// <summary>
        /// 删除官网合作留言
        /// </summary>
        /// <param name="websiteCooperationId">官网合作留言</param>
        Task<bool> Delete(int websiteCooperationId);
        /// <summary>
        /// 获取官网合作留言
        /// </summary>
        /// <param name="websiteCooperationId">官网合作留言</param>
        Task<WebsiteCooperationEntity> GetEntity(int websiteCooperationId);
        /// <summary>
        /// 获取官网合作留言列表
        /// </summary>
        Task<IEnumerable<WebsiteCooperationEntity>> GetList();
        /// <summary>
        /// 获取官网合作留言分页列表
        /// </summary>
        /// <param name="hasFollowUp">已跟进</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<WebsiteCooperationEntity>, int)> Query(bool? hasFollowUp, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
    }


}